<?php
/*
this is the class which send automatic email when:
Something Done:

Something Wrong:
1) If download failed, Email me 
 

*/
class Model_Rmaemailshandler
{
	

	public function rmaRejectedemail($rmaID,$shopemail,$manageremail,$comment,$shop = null){

		date_default_timezone_set('Australia/Melbourne');
		$timenow = date("D Y-m-d g:i a");		
		
		$mailbody = "Hi There,<br /><br />";
		$mailbody .= "I am sorry to info you that the warranty return in shop {$shop} has been rejected on".$timenow." as follow reason<br />";
		$mailbody .= $comment."<br />"; 
		$mailbody .= "";
		$mailbody .= "Best Regards,<br /> Yuki<br /><br />,Email: office5@phonecollection.com.au<br />";
		
		$subject = 'Your RMA ID: '.$rmaID.' has been rejected';
		
		$receiver = $shopemail.';'.$manageremail.';office5@phonecollection.com.au';
		
		$mail = new Model_Emailshandler();
		$mail->sendNormalEmail($receiver, $subject, $mailbody);
			
	}
	
	public function faultySendBackEmail($sMethod){
		
		date_default_timezone_set('Australia/Melbourne');
		$timenow = date("D Y-m-d g:i a");

		$mailbody = "Dear Warehouse, we have done the RMA online and will need to post the item back to Supplier Using Following Method : [";
		$mailbody .= $sMethod."]. If you have schedual Pickup of this courier/ eBay Department Delivery, Please Let we Admin department know (elaine).";
		$mailbody .= "Many Thanks. Please make the call for us.";
		
		
		$mail = new Model_Emailshandler();
		$receiver = "warehouse1@phonecollection.com.au;office5@phonecollection.com.au";
		$mail->sendActionEmail($receiver,'Please Arrange Courier or Delivery for Send the RMA Back to Supplier', $mailbody);		
	}
			
    
}
?>